#! /bin/bash

set -e

echo 'tar -zxvf /opt/software/kafka_2.12-3.0.0.tgz -C /opt/module/'
tar -zxvf /opt/software/kafka_2.12-3.0.0.tgz -C /opt/module/

tee -a /etc/profile.d/set_env.sh <<-'EOF'
#KAFKA_HOME
export KAFKA_HOME=/opt/module/kafka_2.12-3.0.0
export PATH=$PATH:$KAFKA_HOME/bin

EOF

source /etc/profile